﻿/*
 * Cratos Tools - General
 * Cratos Action Column Attribute class
 * 
 * Copyright (c) 2011-2012 Draco
 * 
 * This file is part of Cratos.
 * 
 * Cratos is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * Cratos is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Cratos.  If not, see <http://www.gnu.org/licenses/>.
 * 
 *       .==.        .==.
 *      //'^\\      //^'\\
 *     // ^ ^\(\__/)/^ ^^\\
 *    //^ ^^ ^/6  6\ ^^ ^ \\
 *   //^ ^^ ^/( .. )\^ ^ ^ \\
 *  // ^^ ^/\| V""V|/\^ ^ ^ \\
 * //^^/\/ /  '~~'  \ \/\^ ^ \\
 *  ------------------------------------
 *  HERE BE DRAGONS
 *  
 *  Johan Dercksen - johan@draco.co.za
 */
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace Cratos.Tools.General
{
	/// <summary>
	/// Cratos Data Object Action Column Attribute class
	/// </summary>
	[Serializable]
	[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
	public class DOCratosActionColumnAttribute : Attribute
	{
		#region Class Constant declarations
		#endregion

		#region Class Event declarations
		#endregion

		#region Class Variable declarations
		#endregion

		#region Class Constructors & Destructors
		/// <summary>
		/// Class Constructor
		/// </summary>
		/// <param name="doAction">Cratos Data Object Action</param>
		/// <param name="isMandatory">Mandatory indicator</param>
		public DOCratosActionColumnAttribute(DOCratosAction doAction, bool isMandatory) : base()
		{
			// Save the incoming values
			this.CratosAction						= doAction;
			this.CratosCustomActionName	= "";
			this.IsMandatory						= isMandatory;
		}

		/// <summary>
		/// Class Constructor
		/// </summary>
		/// <param name="doAction">Cratos Data Object Action</param>
		/// <param name="customActionName">Custom Action Name</param>
		/// <param name="isMandatory">Mandatory indicator</param>
		public DOCratosActionColumnAttribute(DOCratosAction doAction, string customActionName, bool isMandatory) : base()
		{
			// Save the incoming values
			this.CratosAction						= doAction;
			this.CratosCustomActionName	= customActionName;
			this.IsMandatory						= isMandatory;
		}
		#endregion

		#region Class Properties
		/// <summary>
		/// Cratos Data Object Action 
		/// </summary>
		public DOCratosAction CratosAction { get; set; }

		/// <summary>
		/// Cratos Custom Action Name
		/// </summary>
		public string CratosCustomActionName { get; set; }

		/// <summary>
		/// Mandatory indicator
		/// </summary>
		public bool IsMandatory { get; set; }

		/// <summary>
		/// Database Parameter Name
		/// </summary>
		public string DBParameterName { get; set; }

		/// <summary>
		/// Action Property Direction
		/// </summary>
		public DOCratosActionPropertyDirection Direction { get; set; }
		#endregion

		#region Class Methods
		#endregion

		#region Class Support Methods
		#endregion
	}
}
